package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.pojo.User;
import com.heima.pojo.vo.LoginUserVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {

/*    @Select("select id as userId,user_name as userName," +
            "mobile,company_id as companyId,role_code as roleCode,secret from tb_user " +
            "where login_name=#{loginName} and password=#{password}")*/
    LoginUserVo login(String loginName, String password);

//    @Select("select count(*) from tb_user where ")
    Long getTotal(String userName);


    List<User> getSearch(Integer startIndex, Integer pageSize, String userName);
}
